<?php
require_once('db/db.php');
$db=new DB;

$data=$db->get_all('select `id`,`desc` from category where father=0');
array_unshift($data, array('id'=>0, 'desc'=>'顶级类别'));
echo json_encode($data);
?>
